﻿using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using AssessmentTool.PresentationLogic;
using AssessmentTool.PresentationLogic.Controllers;
using AssessmentTool.Controls;

namespace AssessmentTool
{
	public partial class Menu : UserControl
	{
        MenuController controller;
        
		public Menu()
		{
			// Required to initialize variables
			InitializeComponent();
            controller = new MenuController(this);
            LayoutRoot.Visibility = Visibility.Collapsed;
            Show.Completed += new EventHandler(Show_Completed);
            
		}

       
        public void show(EventArgs e)
        {
            LayoutRoot.Visibility = Visibility.Visible;
            AnimationShowWidthFrame.Value = this.ActualWidth;
            Show.Begin();          
        }

        public void Show_Completed(object sender, EventArgs e)
        {
            legend.Opened = true;   
        }
        public void hide(EventArgs e)
        {
            LayoutRoot.Visibility = Visibility.Collapsed;
            border.Opacity = 0;
            legend.Opacity = 0;
        }
        public void setNomeUtente(String nome)
        {
            txtUtenteName.Text = nome;
        }
        public void addPulsante(MenuBottons bottons)
        {
            pannelloPulsanti.Children.Add(bottons);
        }

        public void clear()
        {
            pannelloPulsanti.Children.Clear();
        }
	}
}